<script src="{{ getAssets }}js/amazeui.datatables.min.js?v={{ assets_version }}"></script>
<script>
    var tables = $('#dataTables').DataTable({
        "sAjaxSource" : "{{ urlfor "InspectsController.EditPriceRecord"}}"
        ,"bLengthChange": false
        ,"fnServerData" : function(sSource, aoData, fnCallback) {
            var params = checkQueryTableData(aoData);
            params.InspectsId = Number($('#Id').val());
            $.post(sSource, JSON.stringify(params),function(resp) {
                fnCallback(resp);
            },'json')
        }
        ,columns: [
            {"mDataProp" : "Id", "bSortable": false}
            ,{"data" : "NowPrice", "bSortable": false}
            ,{"data" : "OldPrice", "bSortable": false}
            ,{"data" : "CreatedBy", "bSortable": false, render:function(data, type, full, meta) {
                    return full.CreatedBy
                }}
            ,{"data" : "CreatedAt", "bSortable": false, render:function(data, type, full, meta) {
                    return timetrans(data);
                }}
        ]
        ,"aLengthMenu":[5, 10, 15, 20]
        ,'bLengthChange': true
        ,"serverSide": true
        ,"bPaginate" : true
        ,"bFilter" : false	//是否启动过滤、搜索功能
        ,"bInfo" : true //是否显示页脚信息，DataTables插件左下角显示记录数
        ,"bProcessing" : true //DataTables载入数据时，是否显示‘进度’提示

    });
</script>